function Frac=CrossSectionVarDec(QQ,QW,GroupInd)

% Var     =   DistApp_QW_QW2Moment(QW,QQ,[2]);

N_Group =   length(GroupInd);
ConVar  =   zeros(N_Group,1);
ConMean =   zeros(N_Group,1);
ConProb =   zeros(N_Group,1);
for ii=1:N_Group
    [ConVar(ii),ConMean(ii),ConProb(ii)]  ...
            =   DistApp_QW_QW2Moment(QW(GroupInd{ii}),QQ(GroupInd{ii}),[2]);
end
TempInd     =   ( ~isnan(ConVar) & ~isnan(ConMean) & ~isnan(ConProb) );

ConVar      =   ConVar(TempInd);
ConMean     =   ConMean(TempInd);
ConProb     =   ConProb(TempInd)/sum(ConProb(TempInd));

ExpConVar   =   ConVar'*ConProb;
VarConMean  =   DistApp_QW_QW2Moment(ConProb,ConMean,[2]);

Var         =   ExpConVar + VarConMean;

Frac        =   [ExpConVar;VarConMean]/Var;
